/*
 * @Author: Huangdong
 * @Date: 2022-03-28 15:21:05
 * @LastEditors: minsheng_insurance_agency_zhoucl
 * @LastEditTime: 2025-11-20 15:58:34
 * @FilePath: \01.latest-short-insure\src\main.js
 * @Description:
 *
 *
 */
import Vue from "vue";
import App from "./App.vue";
import router from "./router/index";
import "@/assets/style/index.less";
import $axios from "@/utils/request";
import { editMixin } from "@/mixins/edit.js";
import store from "./store/index";
import myComponents from "./components/index.js";
import "@/components/Vant";
import "@/utils/globalui.js";

import "@/utils/rem.js";
import filters from "@/utils/filters";

import { getDataFromUrl } from "./utils";
import { setMessage, getMessage } from "@/methods/cache.js";
import * as globalFuns from "@/methods/globals";
let version = require("@/config/version.json");

// 把变量挂载到vue的原型上
Vue.prototype.$version = version.version; // 版本号管理
Vue.prototype.$http = $axios;
Vue.prototype.$setMessage = setMessage; // 本地存储数据
Vue.prototype.$getMessage = getMessage; // 获取本地存储数据
Vue.prototype.$getDataFromUrl = getDataFromUrl; // 获取地址栏数据
Vue.prototype.$GlobalFuns = globalFuns;

Vue.mixin(editMixin);

Vue.config.productionTip = false;

//全局遍历注册
Object.keys(myComponents).forEach((key) => {
  Vue.component(key.toString(), myComponents[key]);
});

Object.keys(filters).forEach((key) => Vue.filter(key, filters[key]));

import VueLazyLoad from "vue-lazyload";
Vue.use(VueLazyLoad, {
  preLoad: 1,
  loading: "//wxou.mschn.cn/app_h5/insurepics/img/load.gif",
  attempt: 2,
});

new Vue({
  store,
  router,
  render: (h) => h(App),
}).$mount("#app");
